frappe.ui.form.on('Company', {
	refresh(frm) {
		// your code here


        frm.set_query("stock_adjustment_account", function (doc) {
			return {
				filters: { company: doc.name,  root_type: "Asset", account_type: "Stock Adjustment" ,is_group: 0},
			};
		});

        frm.set_query("expenses_included_in_valuation", function (doc) {
			return {
				filters: { company: doc.name,  root_type: ["in",["Asset","Expense"]], account_type: "Expenses Included in Valuation",is_group:0},
			};
		});
        frm.set_query("default_operating_cost_account", function (doc) {
			return {
				filters: { company: doc.name,  root_type: ["in",["Asset","Expense"]], is_group:0},
			};
		});
        frm.set_query("production_input_account", function (doc) {
			return {
				filters: { company: doc.name,  root_type: ["in",["Asset","Expense"]], is_group:0},
			};
		});
        frm.set_query("production_output_account", function (doc) {
			return {
				filters: { company: doc.name,  root_type: ["in",["Asset","Expense"]], is_group:0},
			};
		});

	}
})